//
// Side navigation
// --------------------------------------------------
// Scrollspy and affixed-enhanced navigation,
// to highlight sections and secondary
// sections of docs content.


// Variables
@sidenav-link-color:       #36556E;


// Hide the sidenav on smaller screens
.sidebar {
  display: none;
}

// By default it's not affixed in
// mobile views, so undo that
.sidebar.affix {
  position: static;
}


/* First level of nav */
.sidenav {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-top: 10px;
  padding-bottom: 10px;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  background-color: @gray-lightest;
  border-radius: 5px;
}

/* All levels of nav */
.sidebar .nav > li > a {
  display: block;
  color: @sidenav-link-color;
  padding: 5px 20px;
}
.sidebar .nav > li > a:hover,
.sidebar .nav > li > a:focus {
  text-decoration: none;
  background-color: #e8ebee;
  border-right: 1px solid #d8dde2;
}
.sidebar .nav > .active > a,
.sidebar .nav > .active:hover > a,
.sidebar .nav > .active:focus > a {
  font-weight: bold;
  color: @navbar-inverse-bg;
  background-color: transparent;
  border-right: 1px solid @navbar-inverse-bg;
}

// Nav: second (nested) level (shown on .active)
.sidebar .nav .nav {
  display: none; // Hide by default, show when > 768px
  margin-bottom: 8px;

  > li > a {
    padding: 3px 30px;
    font-size: 90%;
  }
}

// Icons
.sidebar .glyphicon {
  font-size: 12px;
  margin-left: 10px
}



// Show and affix the side nav when space allows it
@media (min-width: 992px) {
  // Show the sidenav on larger screens
  .sidebar {
    display: block;
    padding-top: 15px;
  }
  .sidebar .nav > .active > ul {
    display: block;
  }
  // Widen the fixed sidebar
  .sidebar.affix,
  .sidebar.affix-bottom {
    width: 213px;
  }
  .sidebar.affix {
    position: fixed; // Undo the static from mobile first approach
    top: 45px;
    bottom: 0;
    overflow: auto;
  }
  .sidebar.affix-bottom {
    position: absolute; // Undo the static from mobile first approach
  }
  .sidebar.affix .sidenav,
  .sidebar.affix-bottom .sidenav {
    margin-top: 10px;
    margin-bottom: 0;
  }
}


@media (min-width: 1200px) {

  // Widen the fixed sidebar again
  .sidebar.affix-bottom,
  .sidebar.affix {
    width: 263px;
  }
}
